
from django.conf import settings


if hasattr(settings, 'DJFACET_CACHE'):
	DJFACET_CACHE = settings.DJFACET_CACHE
else:
	DJFACET_CACHE = False

# 2011-09-05: eliminated	
# if hasattr(settings, 'DJFACET_COUNT'):
# 	DJFACET_COUNT = settings.DJFACET_COUNT
# else:
# 	DJFACET_COUNT = True	
	
	
if hasattr(settings, 'DJFACET_TEST'):
	DJFACET_TEST = settings.DJFACET_TEST
else:
	DJFACET_TEST = False

	

if hasattr(settings, 'DJFACET_AJAX'):
	DJFACET_AJAX = settings.DJFACET_AJAX
else:
	DJFACET_AJAX = False	
	
	
if hasattr(settings, 'DJ_MAX_RESULTS_PER_PAGE'):
	DJ_MAX_RESULTS_PER_PAGE = settings.DJ_MAX_RESULTS_PER_PAGE
else:
	DJ_MAX_RESULTS_PER_PAGE = 50	


if hasattr(settings, 'DJ_2COLUMNS_INNERFACET'):
	DJ_2COLUMNS_INNERFACET = settings.DJ_2COLUMNS_INNERFACET
else:
	DJ_2COLUMNS_INNERFACET = False
	


if hasattr(settings, 'DJ_SHOWLOGS'):
	DJ_SHOWLOGS = settings.DJ_SHOWLOGS
else:
	DJ_SHOWLOGS = False



if hasattr(settings, 'DJ_SPECS_MODULE'):
	DJ_SPECS_MODULE = settings.DJ_SPECS_MODULE
else:
	DJ_SPECS_MODULE = 'facetspecs'



if hasattr(settings, 'DJ_URL_AS_NUMBERS'):
	DJ_URL_AS_NUMBERS = settings.DJ_URL_AS_NUMBERS
else:
	DJ_URL_AS_NUMBERS = False



if hasattr(settings, 'DJ_SPLASHPAGE'):
	DJ_SPLASHPAGE = settings.DJ_SPLASHPAGE
else:
	DJ_SPLASHPAGE = True


if hasattr(settings, 'DJ_SPLASHPAGE_ORIENTATION'):
	if settings.DJ_SPLASHPAGE in ['horizontal', 'vertical']:
		DJ_SPLASHPAGE = settings.DJ_SPLASHPAGE
else:
	DJ_SPLASHPAGE = 'vertical'



import os
specs_location = os.environ['DJANGO_SETTINGS_MODULE'].split('.')[0] + '.' + DJ_SPECS_MODULE 
try:
	DJ_SPECS = __import__(specs_location, globals(), locals(), [''])
except:
	print("\n************* DJ_FACET: can't find the <facetspecs.py> file.. It must be at the root level of your django project ***********")
	raise




# THIS WORKS TOO, BUT SEEMS LESS PORTABLE
# import facetspecs as SPECS






# http://www.myhtmltutorials.com/softcolor.html

SOFT_HTML_COLORS = ( "EEFFFF", "FFEEFF" , "FFFFEE", "EEEEEE" ,"EEFFEE" , "FFEEEE" , "DDEEEE" ,	"EEDDEE",	"EEEEDD", "DDDDEE", "DDEEDD","EEDDDD", 	"DDFFFF",	"FFDDFF",	"FFFFDD", "DDDDFF", "DDFFDD",	"FFDDDD", "CCDDDD", "DDCCDD", "DDDDDD" ,  "EEEEFF", "DDDDCC", "CCCCDD", "CCDDCC",	"DDCCCC", "CCEEEE", "EECCEE",	"EEEECC", "CCCCEE", "CCEECC",	"EECCCC" ,"CCFFFF", "FFCCFF",	"FFFFCC" ,"CCCCFF", "CCFFCC",	"FFCCCC")


# SOFT_HTML_COLORS = ( "red", "green" )





